/*
 * Globals.h
 *
 * Created: 2012-05-28 22:47:19
 *  Author: Sebastian_2
 */ 


#ifndef GLOBALS_H_
#define GLOBALS_H_

#include "conf.h"
#include "DataTypes.h"
#include "Menu.h"
#include "Colours.h"
#include "drivers/SD/ff.h"
#include "drivers/XMEGA.h"

volatile enum Status gStatus;

extern point gP1, gP2;
point *gPPtr1, *gPPtr2;
volatile enum Gesture gGesture;

volatile uint16_t gColour;

volatile RTCt gRTC;
volatile enum RTCs gRTCStatus;

temperature gLocalTemperature, gRemoteTemperature;

//extern TWI_Master_t gTWI_Master;

uint8_t gRadioStationsNum;

FIL gVS1003File;
AudioFile_t gVS1003FileInfo;
uint8_t gVS1003Buffer1[VS1003_BUFSIZE];//, gVS1003Buffer2[VS1003_BUFSIZE];
uint16_t gVS1003BufferLenth; // actual length of valid data in buffer in bytes

// menu-specific global variables
enum Menu gMenu;

uint8_t mPlayerGoBackToMain;

uint8_t mArtistsCurrentPage;
char mArtistsDirList[ITEMS_ON_PAGE][9];
uint8_t mArtistsCurrentDir;

uint8_t mSongsCurrentPage;
uint8_t mSongsSelectedRow;
uint8_t mSongsMaxItems;

uint8_t mRStationsCurrentPage;
uint8_t mRStationsSelectedRow;
uint8_t mRStationsMaxItems;

volatile enum Event mCalendarEvent;
uint8_t mCalendarDayToDisplay;
uint8_t mCalendarMonthToDisplay;
uint8_t mCalendarYearToDisplay;

uint8_t mCalendarSelectedHour;
uint8_t mCalendarSelectedMinutes;
uint8_t mCalendarSelectedDay;
uint8_t mCalendarSelectedMonth;
uint8_t mCalendarSelectedYear;
uint8_t mCalendarFirstDay;
char mCalendarEventName[11];
char mCalendarEventTemp[3];

uint8_t mPhotoAlbumsCurrentPage;
uint8_t mPhotoAlbumsSelectedColumn;

volatile enum Keyboard_Display mKeyboardDisplay;
char* mKeyboardString;

#endif /* GLOBALS_H_ */